<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<jsp:include page="xhtml-header.jsp"/>
<jsp:include page="header-tag.jsp">
	<jsp:param name="pagetitle" value="Error"/>
</jsp:include>
<div>
<h1>An Error Occured ${request['javax.servlet.error.status_code'] }</h1>
<h2><%= request.getAttribute("javax.servlet.error.message") %></h2>
<p>ocurred while accessing: <%=
request.getAttribute("javax.servlet.error.request_uri") %>
(servlet: <%= request.getAttribute("javax.servlet.error.servlet_name")
%>)</p>

<%
Throwable e = (Throwable)request.getAttribute("javax.servlet.error.exception");
while(e!=null)
{
StackTraceElement[] stack = e.getStackTrace();
%>
<table><caption>Caused by: <%= e.getMessage() %></caption>
<tr><th>File</th><th>Line</th><th>Class</th><th>Method</th></tr>
<%
for(StackTraceElement element:stack)
	{
	%><tr>
		<td><%= element.getFileName() %></td>
		<td><%= element.getLineNumber() %></td>
		<td><%= element.getClassName() %></td>
		<td><%= element.getMethodName() %></td>
	</tr><%
	}

%>
</table>
<hr/>
<%
e=e.getCause();
}%>

</div>
<jsp:include page="xhtml-footer.jsp"/>

